﻿@using StarBlog.Web.Contrib.SiteMessage
@model Message?

@if (Model != null) {
    <div class="alert alert-@Model.Tag d-flex align-items-center alert-dismissible fade show" role="alert">
        <div class="mx-2" style="font-size: 2rem">
            @switch (Model.Tag) {
                case MessageTags.Debug:
                    <i class="fa fa-question-circle me-2"></i>
                    break;
                case MessageTags.Info:
                    <i class="fa fa-info-circle me-2"></i>
                    break;
                case MessageTags.Success:
                    <i class="fa fa-check-circle me-2"></i>
                    break;
                case MessageTags.Warning:
                    <i class="fa fa-exclamation-triangle me-2"></i>
                    break;
                case MessageTags.Error:
                    <i class="fa fa-times-circle me-2"></i>
                    break;
            }
        </div>
        
        <div>
            @if (Model.Title != null) {
                <h5>@Html.Raw(Model.Title)</h5>
            }
            @Html.Raw(Model.Content)
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
    </div>
}